<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    //内置数学对象 Math
    console.log(Math.PI); // 3.141592653589793
    //random:生成0-1之间的随机数
    console.log(Math.random()); //能取到0不能取到1
    //生成0-10之间的随机数
    consloe.log(Math.floor(Math.random() * 11))
    //ceil 向上取整
    console.log(Math.ceil(3.1)); // 4
    //floor 向下取整
    console.log(Math.floor(3.9)); // 3
    //max 找最大数
    console.log(Math.max(3, 5, 1)); // 5
    //min 找最小数
    console.log(Math.min(3, 5, 1)); // 1
    //pow 幂运算
    console.log(Math.pow(2, 3)); // 8
    //abs 绝对值
    console.log(Math.abs(-3)); // 3





  </script>
</body>

</html>